home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cuj9205.zip / 1005063A < prev    next >
Text File  |  1992-06-02  |  717b  |  41 lines

  1. /* Listing 3 */
  2.  
  3. /*****************************************************
  4.     ADC.C 
  5.  
  6.     Routines for basic control of the ADC on the 
  7.     Lab Master AD.
  8.  
  9.     Copyright Don Bradley, 1991.
  10.  
  11.     Permission is granted for used of these routines
  12.     in any manner as long as this copyright notice is 
  13.     included.
  14.  
  15.     Tested using Quick C 2.5 and MSC 6.0 on a 
  16.     Toshiba T5200.
  17.  
  18.  *****************************************************/
  19.  
  20. #include <conio.h>
  21.  
  22. #include "labmastr.h"
  23.  
  24. void disable_adc()
  25. /*& Disable adc through stopping timer 5's output. */
  26.     {
  27.     timer5_off();
  28.     }
  29.  
  30. void enable_adc()
  31. /*& Enable adc through starting timer 5's output. */
  32.     {
  33.     timer5_on();
  34.     }
  35.  
  36. int adc_status()
  37. /*& Return the ADC status */
  38.     {
  39.     return (inp(ADC_STATUS));
  40.     }
  41.